package com.xinan.system.meetwx;

import java.util.List;

import com.jfinal.ext.plugin.tablebind.TableBind;
import com.jfinal.kit.StrKit;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.Record;

@TableBind(tableName = "tb_meet_transmit")
public class TbMeetTransmit extends Model<TbMeetTransmit>{
	
	private static final long serialVersionUID = 1L;
	
    public static final TbMeetTransmit dao = new TbMeetTransmit();

    //columns START
    private String ID = "id";  //主键
    private String TRANSMITUSERID = "transmituserid";  //转发人ID
    private String MEETID = "meetid";  //会议ID
    private String BUSINESSID = "businessid";  //转发业务主键
    private String TYPE = "type";  //业务类型：1 软文 2 课程
    private String CREATETIME = "createtime";  //转发时间
    private String CREATEID = "createid";  //转发者

    public void setId(int value) {
        set(ID, value);
    }

	public int getId() {
		return get(ID);
	}
    public void setTransmituserid(int value) {
        set(TRANSMITUSERID, value);
    }

	public int getTransmituserid() {
		return get(TRANSMITUSERID);
	}
    public void setMeetid(int value) {
        set(MEETID, value);
    }

	public int getMeetid() {
		return get(MEETID);
	}
    public void setBusinessid(int value) {
        set(BUSINESSID, value);
    }

	public int getBusinessid() {
		return get(BUSINESSID);
	}
    public void setType(int value) {
        set(TYPE, value);
    }

	public int getType() {
		return get(TYPE);
	}
    public void setCreatetime(String value) {
        set(CREATETIME, value);
    }

	public String getCreatetime() {
		return get(CREATETIME);
	}
    public void setCreateid(String value) {
        set(CREATEID, value);
    }

	public String getCreateid() {
		return get(CREATEID);
	}
	//columns END

    public List<TbMeetTransmit> findAll() {
        return find("select * from tb_meet_transmit");
    }
    /**
     * @param   where
     * @return  Record
     */
    public List<Record> findAlls(String where) {
        String sqlExp = " from tb_meet_transmit";
        if(StrKit.notBlank(where)){
                sqlExp += " where " + where;
        }
                return Db.find( "select * " +sqlExp );

    }

    public Page<TbMeetTransmit> page(int pageNumber, int pageSize, String where) {
        String sqlExp = "from tb_meet_transmit";
        if(StrKit.notBlank(where)){
            sqlExp += " where " + where;
        }
        return paginate(pageNumber, pageSize, "select *", sqlExp);
    }
}

